{% extends 'base.html' %}

{% block title %}
Register
{% endblock %}

{% block captcha %}
<!--<script src='https://www.google.com/recaptcha/api.js'></script>-->
{% endblock %}

{% block body %}

<div class="col-lg-4">
    <form method="POST" action="{{ url_for('main.register') }}">
        {{ form.hidden_tag() }}
        <div class="form-group">
            {{ form.username.label }}
            {% for error in form.username.errors %}
                <div class="alert help-block">{{ error }}</p>
            {% endfor %}
            {{ form.username(class_='form-control') }}
        </div>
        <div class="form-group">
            {{ form.password.label }}
            {% for error in form.password.errors %}
                <div class="alert alert-danger">{{ error }}</p>
            {% endfor %}
            {{ form.password(class_='form-control') }}
        </div>
        <div class="form-group">
            {{ form.confirm.label }}
            {% for error in form.confirm.errors %}
                <p class="alert alert-danger">{{ error }}</p>
            {% endfor %}
            {{ form.confirm(class_='form-control') }}
        </div>
        <div class="form-group">
            <label for="form-group"></label>
            <label for="form-group">{{ form.recaptcha.label }}</label>
            <br />
            <img src="../../static/images/captcha.png?{{ randNum }}" alt="captcha">
        </div>
        <div class="form-group">
            {{ form.recaptcha(class_='form-control') }}
        </div>
        <input class="btn btn-primary" type="submit" value="Register">
        <!--<div class="g-recaptcha" data-sitekey="6LdcaTwUAAAAAAM5CBw2ab-bnJSnJbA_TG3Hs3rq"></div>-->
    </form>
</div>

{% endblock %}